<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
/* <![CDATA[ */

table, td
{
    border-color: #666;
    border-style: solid;
}
table, th
{
    border-color: #666;
    border-style: solid;
}

table
{
    border-width: 0 0 1px 1px;
    border-spacing: 0;
    border-collapse: collapse;
}
 
td
{
    margin: 0;
    padding: 4px;
    border-width: 1px 1px 0 0;
}
th
{
    margin: 0;
    padding: 4px;
    border-width: 1px 1px 0 0;
}

/* ]]> */
</style>    
    
</head>
<body style="font-family:Arial, Helvetica, sans-serif">
<?php
$errFlag = false;
?>
<h1> Confirm Case: <?php echo $_POST['case_id']?></h1>
<h1>This is Case Confirm Page, This Page is Read Only</h1>
<table width="600" cellspacing="1" cellpadding="5" style="text-align:left; font-size:13px;">
<form action="/rosteraudit/save-attn-case" method="post" enctype="multipart/form-data" name="form1" id="form1">
  <tr>
      <td colspan="3" align="center"><ul>
      You may still <b><a href="javascript:history.go(-1);">GO BACK</a></b> to modify the evidence you provided ,<br /></td>
    </tr>
  <tr>
    <th colspan="2" scope="row" style="width:350px;" >Case ID:
      <?php
    
    $attCase = new Model_DbTable_Roster_Attncase();
    if($attCase->existCaseID($_POST['case_id'])){
		$errFlag = true;
	?>
      <span style="color:#F00">CASE EXIST,DO NOT PROCEED</span>
      <?php }?></th>
    <td><input name="id_manager" type="hidden" value="<?php echo $_POST['id_manager']?>" />
      <input name="case_id" type="text" id="case_id" value="<?php echo $_POST['case_id']?>" readonly="readonly" /></td>
  </tr>
  <tr>
    <th colspan="2" scope="row" >Choose Staff Name</th>
    <td>
    <input name="staff_name" id="staff_name" type="hidden" value="<?php echo $_POST['staff_name']?>"> 
    <?php echo $this->stName?>
    <br /></td>
  </tr>
  <tr>
    <th colspan="2" scope="row">Shifted Shop</th>
    <td>
      <input type="text" name="shop_code" id="shop_code" value="<?php echo $_POST['shop_code']?>" readonly="readonly" />
      <br />
      </td>
  </tr>
   <tr>
    <th colspan="2" scope="row">Staff Shifted Date</th>
    <td><input name="shift_date" type="text" id="shift_date" value="<?php echo $_POST['shift_date']?>" readonly="readonly" /></td>
  </tr>
  <tr>
    <th rowspan="2" scope="row" style="width:150px;">Manager Allocated Shift</th>
    <th scope="row" style="width:100px;">Shift Begin</th>
    <td><input name="man_shift_begin_hour" type="text" id="man_shift_begin_hour" style="width:50px;" value="<?php echo $_POST['man_shift_begin_hour']?>" readonly="readonly" />
      :
      <input name="man_shift_begin_min" type="text" id="man_shift_begin_min" style="width:50px;"  value="<?php echo $_POST['man_shift_begin_min']?>" readonly="readonly" /></td>
  </tr>
  <tr>
    <th scope="row">Shift End</th>
    <td><input name="man_shift_end_hour" type="text" id="man_shift_end_hour" style="width:50px;" value="<?php echo $_POST['man_shift_end_hour']?>" readonly="readonly"  />
      :
      <input name="man_shift_end_min" type="text" id="man_shift_end_min" style="width:50px;"  value="<?php echo $_POST['man_shift_end_min']?>" readonly="readonly"/></td>
  </tr> 
    <tr>
    <th rowspan="2" scope="row">System  Recorded Login/Logout</th>
    <th scope="row">Login Record</th>
    <td><input name="act_shift_begin_hour" type="text" id="act_shift_begin_hour" style="width:50px;" value="<?php echo $_POST['act_shift_begin_hour']?>" readonly="readonly" />
      :
      <input name="act_shift_begin_min" type="text" id="act_shift_begin_min" style="width:50px;" value="<?php echo $_POST['act_shift_begin_min']?>" readonly="readonly" /></td>
  </tr>
    <tr>
      <th scope="row">Logout Record</th>
    <td><input name="act_shift_end_hour" type="text" id="act_shift_end_hour" style="width:50px;" value="<?php echo $_POST['act_shift_end_hour']?>" readonly="readonly" />
      :
      <input name="act_shift_end_min" type="text" id="act_shift_end_min" style="width:50px;" value="<?php echo $_POST['act_shift_end_min']?>" readonly="readonly" /></td>
  </tr>
    <tr>
      <th rowspan="2" bgcolor="#66CCFF" scope="row">Lauch Claim <br />
      (Input Full Shift HERE)</th>
      <th bgcolor="#66CCFF" scope="row">Propose Shift Begin<span style="color:#800; font-weight:bold">*</span></th>
      <td bgcolor="#66CCFF"><input name="pro_shift_begin_hour" type="text" id="pro_shift_begin_hour" style="width:50px;" value="<?php echo $_POST['pro_shift_begin_hour']?>" readonly="readonly" />
        :
        <input name="pro_shift_begin_min" type="text" id="pro_shift_begin_min" style="width:50px;" value="<?php echo $_POST['pro_shift_begin_min']?>" readonly="readonly" /></td>
    </tr>
    <tr>
      <th bgcolor="#66CCFF" scope="row">Propose Shift End<span style="color:#800; font-weight:bold">*</span></th>
      <td bgcolor="#66CCFF"><input name="pro_shift_end_hour" type="text" id="pro_shift_end_hour" style="width:50px;" value="<?php echo $_POST['pro_shift_end_hour']?>" readonly="readonly" />
        :
        <input name="pro_shift_end_min" type="text" id="pro_shift_end_min" style="width:50px;" value="<?php echo $_POST['pro_shift_end_min']?>" readonly="readonly" /></td>
    </tr>
    <tr>
    <th rowspan="2" scope="row">Break Time<br />
      <span style="font-size:10px;">( Set Second Break to 0 If Only Have One Break )</span></th>
    <th scope="row">First Break<span style="color:#800; font-weight:bold">*</span></th>
    <td><input name="first_break" type="text" id="first_break" style="width:50px;" value="<?php echo $_POST['first_break']?>" readonly="readonly" />
      (Mins)</td>
  </tr>
    <tr>
      <th scope="row">Second Break<span style="color:#800; font-weight:bold">*</span></th>
      <td><input name="second_break" type="text" id="second_break" style="width:50px;" value="<?php echo $_POST['second_break']?>" readonly="readonly" />
        (Mins)</td>
    </tr>
    <tr>
      <th colspan="2" align="center" bgcolor="#66CCFF" scope="row">Difference compare to Propose Hour:<br /></th>
      <th align="left" bgcolor="#66CCFF" scope="row"><input name="hour_diff" type="text" id="hour_short"  style="width:50px;" value="<?php echo $this->hourDiff?>" readonly="readonly" /><?php 
	  if($this->hourDiff <= 0){
		  $errFlag = true;
		  }
	  ?>
      <i style="font-size:10px;">
      <input type="hidden" name="need_pay_hour" id="need_pay_hour" value="<?php echo $this->needPayHour?>" />
      <input type="hidden" name="will_pay_hour" id="will_pay_hour" value= "<?php echo $this->willPayHour?>"/>
      (read only)</i></th>
    </tr>
    <tr>
      <th colspan="3" align="center" scope="row">Evidence Provided</th>
    </tr>

    <tr>
      <th colspan="3" scope="row">Footage for Shift Begin 
        <span style="font-size:10px;"> (.zip file,.doc .docx file,.jpg file)</span>        <label for="footage_on_duty"></label></th>
    </tr>
    <tr>
      <th colspan="3" scope="row" >
      <?php if($this->imgOpen){ ?>
      <input name="link_img_open" id="link_img_open" value="<?php echo $this->imgOpen; ?>" type="hidden">
      <?php 
		  $ext =  strtolower(end(explode('.',$this->imgOpen)));
		  if( $ext == 'jpg' || $ext == 'png' || $ext == 'jpeg' || $ext == 'bmp'){
		  ?>
      <img src="<?php echo $this->imgOpen;?>" width="600" />
	  <?php 
		  }else{
	   ?>
	   	<a href="<?php echo $this->imgOpen;?>" target="_blank" >Click To see</a>	  
		<?php }}else{?> No file uploaded <?php }?>
      </th>
    </tr>
    <tr>
      <th colspan="3" scope="row">Footage for Shift End</th>
    </tr>
    <tr>
      <th colspan="3" scope="row">
      <?php if($this->imgClose){ ?>
      <input name="link_img_close" id="link_img_close" value="<?php echo $this->imgClose; ?>" type="hidden">
	  <?php
		  $ext =  strtolower(end(explode('.',$this->imgClose)));
		  if( $ext == 'jpg' || $ext == 'png' || $ext == 'jpeg' || $ext == 'bmp'){
		  ?>
      <img src="<?php echo $this->imgClose;?>" width="600" />
	  <?php 
		  }else{
	   ?>
	   	<a href="<?php echo $this->imgClose;?>" target="_blank" >Click To see</a>	  
		<?php }}else{?> No file uploaded <?php }?>
      </th>
    </tr>
    <tr>
      <th colspan="2" scope="row">Offline APOS Invoice For Shift Begin<br />
<span style="font-size:10px;"> (Leave blank if the staff missing Off Duty Record )</span></th>
      <td><label for="apos_invoice_on_duty"></label>
      <input name="apos_invoice_on_duty" type="text" id="apos_invoice_on_duty" value="<?php echo $_POST['apos_invoice_on_duty']?>" readonly="readonly" /></td>
    </tr>
    <tr>
      <th colspan="2" scope="row">Offline APOS Invoice For Shift End<br /><span style="font-size:10px;"> (Leave blank if the staff missing On Duty Record )</span></th>
      <td><input name="apos_invoice_off_duty" type="text" id="apos_invoice_off_duty" value="<?php echo $_POST['apos_invoice_off_duty']?>" readonly="readonly" /></td>
    </tr>
    <tr>
      <th colspan="3" scope="row">Reason why I can not provide any footage</th>
    </tr>
    <tr>
      <th colspan="3" scope="row"><label for="reason_missing_footage"></label>
      <textarea name="reason_missing_footage" cols="90" rows="5" readonly="readonly" id="reason_missing_footage"><?php echo $_POST['reason_missing_footage']?></textarea></th>
    </tr>
    <tr>
      <th colspan="3" scope="row">Detail explaination (no words limits)</th>
    </tr>
    <tr>
      <th colspan="3" scope="row"><textarea name="detail_explain" cols="90" rows="5" readonly="readonly" id="detail_explain"><?php echo $_POST['detail_explain']?></textarea></th>
    </tr>
    <tr>
      <th colspan="3" align="center" scope="row"><p>
        <input type="checkbox" name="checkbox" id="checkbox" />
        I have Double Check All Details  and The Staff Has Arrived On Time as Evidence Prooved<br />
      </p>
      <input type="submit" name="button" id="button" value="Confirm All Details and Create Case" <?php echo ($errFlag)?'disabled = "disabled"':''; ?> />
     <?php 
	  if($this->hourDiff <= 0){
		  
		  echo '<span style="color:#FF0000;"> This is No Short Payment, You should Not Create Any Case.</span>';
		  }
	 ?>
      </th>
    </tr>   
     </form> 
</table>
<div style=" font-size:10px; color:#666;float:left;" >Developer:Norman,Date:2015-01-27</div>
</body>
</html>
